<template>
	<view>
		<view class="cu-card dynamic u-skeleton-rect" v-for="(item,index) in items" :key="index" @click="detail(item.id)">
			<view class="cu-item ">
		
				<view class="grid flex-sub" :class="isCard?'col-3 grid-square':'col-1'">
					<view class="bg-img"
						
						v-for="(item,index) in isCard?9:1" :key="index">
					</view>
					<image :src="item.thumb" mode="aspectFill" class="radius " style="width: 100%;"></image>
				</view>
				<view class="padding-top-sm  text-bold text-lg u-skeleton-rect" style="line-height: 2;">
					{{item.title}}
				</view>
				<view class="text-gray text-sm  text-bold u-skeleton-rect">
					<text class="cuIcon-attentionfill"></text> {{item.post_hits}}
					<text class="cuIcon-appreciatefill margin-lr-xs"></text> {{item.post_like}}
					<text class="cuIcon-messagefill margin-lr-xs"></text> {{item.comment_count}}
					<text class="cuIcon-timefill margin-lr-xs"></text> {{item.format_date}}
				</view>
				<view class="text-sm flex padding-tb-xs">
					<view class='text-blue bg-white text-bold margin-right-xs ' v-for="(item,index) in item.tag" :key="index">#{{item}}</view>
					
				</view>
		
		
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"dengje-posts",
		data() {
			return {
				isCard: 0,
			};
		},
		props: {
			items: {
				type: Array,
				default: []
			}
		},
		methods:{
			detail: function(id) {
				uni.navigateTo({
					url: '../detail/detail?id='+id
				})
			},
		}
	}
</script>

<style>

</style>
